<template>
  <div class="hamburger-container" @click="toggleClick">
    <svg-icon className="hamburger" :icon="icon" />
  </div>
</template>

<script setup>
import { computed } from 'vue'
import { useStore } from 'vuex'
const store = useStore()
const icon = computed(() => {
  return store.getters.sidebarOpend ? 'hamburger-opened' : 'hamburger-closed'
})
const toggleClick = () => {
  store.commit('app/triggerSidebarOpend')
}
</script>

<style lang="scss" scoped>
.hamburger-container {
  float: left;
  line-height: 50px;
  ::v-deep .hamburger {
    font-size: 1.3em;
    cursor: pointer;
    transition: all .4s ease-in-out;
  }
}
</style>
